package com.ncloud.crm.mapper;

import java.util.Date;
import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;

import com.ncloud.crm.entity.BsProjProd;

@Mapper
public interface BsProjProdMapper {
	@Select("select a.* from bs_proj_prod a left join bs_project b on a.project_id = b.project_id "
			+ "where b.manager = #{0} and b.cust_id = #{1};")
	@Results({ @Result(column = "project_id", property = "projectId"), 
			@Result(column = "prod_inst_id", property = "prodInstId"),
			@Result(column = "prod_id", property = "prodId"),
			@Result(column = "begin_date", property = "beginDate"),
			@Result(column = "end_date", property = "endDate"),
			@Result(column = "update_time", property = "updateTime"), 
			@Result(column = "update_user", property = "updateUser"),
			@Result(column = "remark", property = "remark") })
	public List<BsProjProd> getProjProdByCustIdAndManager(String manager,String custId);
}
